package com.toe.commodity.webapi.service.impl;

import com.toe.commodity.service.CommodityGoodsTypeService;
import com.toe.pojo.entity.commodity.CommodityGoodsType;
import com.toe.commodity.webapi.mapper.CommodityGoodsTypeMapper;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.toe.pojo.vo.commodity.CommodityGoodsTypeVO;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author 陶涛
 * @since 2022-07-19
 */
@Service
@DubboService
public class CommodityGoodsTypeServiceImpl extends ServiceImpl<CommodityGoodsTypeMapper, CommodityGoodsType> implements CommodityGoodsTypeService {

    @Autowired
    CommodityGoodsTypeMapper commodityGoodsTypeMapper;

    @Override
    public List<CommodityGoodsTypeVO> getCommodityGoodsType() {
        return commodityGoodsTypeMapper.getCommodityGoodsType();
    }

    @Override
    public void addNewCommodityGoodsType(String goodsTypeName) {
        commodityGoodsTypeMapper.addNewCommodityGoodsType(goodsTypeName);
    }

    @Override
    public void deletedCommodityGoodsType(Long id) {
        commodityGoodsTypeMapper.deletedCommodityGoodsType(id);
    }

    @Override
    public void updateCommodityGoodsTypeName(CommodityGoodsType commodityGoodsType) {
        commodityGoodsTypeMapper.updateCommodityGoodsTypeName(commodityGoodsType);
    }
}
